package com.appero.metier;

import android.os.Parcel;
import android.os.Parcelable;

public class QteIngredient implements Parcelable{

	private String quantite;
	private String ingredient;
	
	
	public QteIngredient() {
		super();
	}

	public QteIngredient(String quantite, String ingredient) {
		this.quantite = quantite;
		this.ingredient = ingredient;
	}
	
	public String getQuantite() {
		return quantite;
	}
	public void setQuantite(String quantite) {
		this.quantite = quantite;
	}
	public String getIngredient() {
		return ingredient;
	}
	public void setIngredient(String ingredient) {
		this.ingredient = ingredient;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(quantite);
		dest.writeString(ingredient);		
	}
	
	public static final Parcelable.Creator<QteIngredient> CREATOR = new Parcelable.Creator<QteIngredient>()
			{
			    @Override
			    public QteIngredient createFromParcel(Parcel source)
			    {
			        return new QteIngredient(source);
			    }

			    @Override
			    public QteIngredient[] newArray(int size)
			    {
				return new QteIngredient[size];
			    }
			};

			public QteIngredient(Parcel in) {
				this.quantite = in.readString();
				this.ingredient = in.readString();
			}
			
			
		@Override
		public String toString() {
			return quantite + " " + ingredient + "\n";
		}
}
